import request from '@/utils/request'

/**
 * 校验token
 * @param {Object} params 
 */
export function CheckToken(params) {
  return request({
    url: 'API/Authority/CheckToken',
    method: 'get',
    params: params
  })
}

/**
 * 校验token
 * @param {Object} params 
 */
export function GetMyAuditRecordApprove(params) {
  return request({
    url: 'API/RecordReport/GetMyAuditRecordApprove',
    method: 'get',
    params: params
  })
}

/**
 * 获取字典数据
 * @param {Object} params 
 */
export function getDictionarySelect(params) {
  return request({
    url: 'API/BaseData/getDictionarySelect',
    method: 'get',
    params: params
  })
}

/**
 * 获取培训教室列表
 * @param {Object} params 
 */
export function teacherList(params) {
  return request({
    url: 'API/BaseData/GetDeptUserSelect',
    method: 'get',
    params: params
  })
}
/**
 * 获取培训内容列表
 * @param {Object} params 
 */
export function contentList(params) {
  return request({
    url: 'API/Teach/StudentInfoSelect',
    method: 'get',
    params: params
  })
}

/**
 * 获取试卷列表
 * @param {Object} params 
 */
export function getTestList(params) {
  return request({
    url: 'API/QuestionPool/PaperList',
    method: 'get',
    params: params
  })
}

/**
 * 获取仪器列表
 * @param {Object} params 
 */
export function getEquipmentSelect(params) {
  return request({
    url: 'API/DeviceInfo/GetEquipmentSelect',
    method: 'get',
    params: params
  })
}

/**
 * 获取标准
 * @param {Object} params 
 */
export function getTestStandardSelect(params) {
  return request({
    url: 'API/QualityStandard/GetTestStandardSelect',
    method: 'get',
    params: params
  })
}

/**
 * 获取检验记录树
 * @param {Object} params 
 */
export function GetFlatRecordReportActiveTree(params) {
  return request({
    url: 'API/RecordReport/GetFlatRecordReportActiveTree',
    method: 'get',
    params: params
  })
}
/**
 * 获取物料列表
 * @param {Object} params 
 */
export function getMaterialSelect(params) {
  return request({
    url: 'API/MaterialInfo/GetMaterialSelect',
    method: 'get',
    params: params
  })
}

/**
 * 获取物料批号
 * @param {Object} params 
 */
export function getBatchIds(params) {
  return request({
    url: 'API/QualityAnalysis/GetBatchIds',
    method: 'get',
    params: params
  })
}

/**
 * 获取物料批号2
 * @param {Object} params 
 */
export function getBatchIdsTwo(params) {
  return request({
    url: 'API/QualityAnalysis/GetBatchIdsTwo',
    method: 'get',
    params: params
  })
}

/**
 * 获取检验编号
 * @param {Object} params 
 */
export function getReportId(params) {
  return request({
    url: 'API/QualityTest/GetReportId',
    method: 'get',
    params: params
  })
}

/**
 * 获取称重接口
 * @param {Object} params 
 */
export function getRecordWeightAttributes(params) {
  return request({
    url: 'API/RecordAttribute/GetNotWeightAttributes',
    method: 'get',
    params: params
  })
}

/**
 * 根据testID获取物料类型
 * @param {Object} params 
 */
export function getTestByTestId(params) {
  return request({
    url: 'API/QualityTest/GetTestByTestId',
    method: 'get',
    params: params
  })
}

/**
 * 根据testID,物料来获取检验数据
 * @param {Object} params 
 */
export function getTestDataByTestId(params) {
  return request({
    url: 'API/QualityTest/GetTestDataByTestId',
    method: 'get',
    params: params
  })
}

/**
 * 获取单位树
 * @param {Object} params 
 */
export function getDictionaryTree(params) {
  return request({
    url: 'API/BaseData/GetDictionaryTree',
    method: 'get',
    params: params
  })
}

/**
 * 获取班组树
 * @param {Object} params 
 */
export function getInfoTree(params) {
  return request({
    url: 'API/Class/GetInfoTree',
    method: 'get',
    params: params
  })
}

/**
 * 获取人员
 * @param {Object} params 
 */
export function GetUserByDeptIdSelect(params) {
  return request({
    url: 'API/Class/GetUserByDeptIdSelect',
    method: 'get',
    params: params
  })
}

/**
 * 分样帮助
 * @param {Object} params 
 */
export function MaterialClassList(params) {
  return request({
    url: 'API/Class/MaterialClassList',
    method: 'get',
    params: params
  })
}

/**
 * 
 * @param {Object} params 
 */
export function GetRecordReportActiveTree(params) {
  return request({
    url: 'API/RecordReport/GetRecordReportActiveTree',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

/**
 * 
 * @param {Object} params 
 */
export function PreviewElectronicRecordModel(params) {
  return request({
    url: 'API/RecordReport/PreviewElectronicRecordModel',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

/**
 * 
 * @param {Object} params 
 */
export function GetRecordReportAttributes(params) {
  return request({
    url: 'API/RecordAttribute/GetRecordReportAttributes',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

/**
 * 
 * @param {Object} params 
 */
export function GetUserInfo(params) {
  return request({
    url: 'API/BaseData/GetUserInfo',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

/**
 * 
 * @param {Object} params 
 */
export function GetBatchReportData(params) {
  return request({
    url: 'API/RecordReport/GetBatchReportData',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}


/**
 * 
 * @param {Object} params 
 */
export function GetClassUserSelect(params) {
  return request({
    url: 'API/Class/GetClassUserSelectTwo',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

/**
 * 
 * @param {Object} params 
 */
export function GetClassUserSelectThree(params) {
  return request({
    url: 'API/Class/GetClassUserSelectThree',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}


/**
 * 
 * @param {Object} params 
 */
export function SaveRecordReportData(data) {
  return request({
    url: 'API/RecordReport/SaveRecordReportData',
    method: 'post',
    data,
    successMsg: true,//请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

/**
 * 
 * @param {Object} params 
 */
export function ReturnDJData(data) {
  return request({
    url: 'API/RecordReport/ReturnDJData',
    method: 'post',
    data,
    successMsg: true,//请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}


/**
 * 
 * @param {Object} params 
 */
export function GetLogicResult(data) {
  return request({
    url: 'API/RecordBase/GetLogicResult',
    method: 'post',
    data,
    successMsg: true, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}
/**
 * 
 * @param {Object} params 
 */
export function GetLogicResultAndOr(data) {
  return request({
    url: 'API/RecordBase/GetLogicResultAndOr',
    method: 'post',
    data,
    successMsg: true, //请求成功通知，支持String & Boolean
    failMsg: false //请求失败通知，支持String & Boolean
  })
}
/**
 * 
 * @param {Object} params 
 */
export function GetCalculateResult(data) {
  return request({
    url: 'API/RecordBase/GetCalculateResult',
    method: 'post',
    data,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: false //请求失败通知，支持String & Boolean
  })
}


/**
 * 获取pdf 相关数组
 * @param {Object} params 
 */
export function getEquipmentFileSelect(params) {
  return request({
    url: 'API/RecordFile/GetEquipmentFileSelect',
    method: 'get',
    params: params
  })
}
/**
 * 删除pdf 相关数组内的内容
 * @param {Object} params 
 */
export function deleteEquipFile(params) {
  return request({
    url: 'API/RecordFile/DeleteEquipFile',
    method: 'get',
    params: params
  })
}

/**
 * 分样帮助
 * @param {Object} params 
 */
export function getSampleShareAttributes(params) {
  return request({
    url: 'API/RetainedSample/GetSampleShareAttributes',
    method: 'get',
    params: params
  })
}

/**
 * 账号判断
 * @param {Object} params 
 */
export function checkPassword(data) {
  return request({
    url: 'API/QualityTest/CheckPassword',
    method: 'post',
    data,
  })
}

/**
 * pdf上传
 * @param {Object} params 
 */
export function uploadEquipmentFile(data) {
  return request({
    url: 'API/RecordFile/UploadEquipmentFile',
    method: 'post',
    data,
  })
}


/**
 * 签到获取id
 * @param {Object} data 
 */
export function signInStudentInfo(data) {
  return request({
    url: 'API/Teach/SignInStudentInfo',
    method: 'post',
    data,
    // timeout: 120 * 1000
  })
}
/**
 * s试题答案提交
 * @param {Object} data 
 */
export function submitTestPaper(data) {
  return request({
    url: 'API/Teach/SubmitTestPaper',
    method: 'post',
    data,
    // timeout: 120 * 1000
  })
}

/**
 * s保存记录项目数据
 * @param {Object} data 
 */
export function saveRecordReportData(data) {
  return request({
    url: 'API/RecordReport/SaveRecordReportData',
    method: 'post',
    data,
    // timeout: 120 * 1000
  })
}

/**
 * s保存样品分样数据
 * @param {Object} data 
 */
export function saveSampleShare(data) {
  return request({
    url: 'API/RetainedSample/SaveSampleShare',
    method: 'post',
    data,
    // timeout: 120 * 1000
  })
}

/**
 * 获取pdf文件的值
 * @param {Object} data 
 */
export function getConfigAttributesText(data) {
  return request({
    url: 'API/RecordAttribute/GetConfigAttributesText',
    method: 'post',
    data,
    // timeout: 120 * 1000
  })
}


/**
 * 获取获取检验样品树
 * @param {Object} params 
 */
export function getTestTree(params) {
  return request({
    url: 'API/QualityTest/GetTestTree',
    method: 'get',
    params: params
  })
}

/**
 * 保存称量任务
 * @param {Object} data 
 */
export function saveTaskItems(data) {
  return request({
    url: 'API/QualityWeight/SaveTaskItems',
    method: 'post',
    data,
    // timeout: 120 * 1000
  })
}

/**
 * 获取项目code
 * @param {Object} params 
 */
export function getTaskSelect(params) {
  return request({
    url: 'API/QualityWeight/GetTaskSelect',
    method: 'get',
    params: params
  })
}

/**
 * 获取项目列表
 * @param {Object} params 
 */
export function getTaskItems(params) {
  return request({
    url: 'API/QualityWeight/GetTaskItems',
    method: 'get',
    params: params,

  })
}

/**
 * 保存称量数据
 * @param {Object} data 
 */
export function saveTaskItemData(data) {
  return request({
    url: 'API/ApparatusProject/SaveTaskItemData',
    method: 'post',
    data,
    successMsg: false,
    failMsg: false
    // timeout: 120 * 1000
  });
}
/**
 * 递交
 * @param {Object} data 
 */
export function SubmitRecordApprove(data) {
  return request({
    url: 'API/RecordReport/SubmitRecordApprove',
    method: 'post',
    data,
    // timeout: 120 * 1000
  })
}

/**
 * 反填检验项目
 * @param {Object} params 
 */
export function GetRecordReportData(params) {
  return request({
    url: 'API/RecordReport/GetRecordReportData',
    method: 'get',
    params: params
  })
}


/**
 * 保存称量数据
 * @param {Object} data 
 */
export function taskItemWeighAgain(data) {
  return request({
    url: 'API/ApparatusProject/TaskItemWeighAgain',
    method: 'post',
    data,
    // timeout: 120 * 1000
  });
}

/**
 * 保存称量数据
 * @param {Object} data 
 */
export function saveReckonTaskItemData(data) {
  return request({
    url: 'API/ApparatusProject/SaveReckonTaskItemData',
    method: 'post',
    data,
    successMsg: false,
    failMsg: false
    // timeout: 120 * 1000
  });
}


/**
 * 获取标准
 * @param {Object} params 
 */
export function GetStandardBaseOnList(params) {
  return request({
    url: 'API/QualityTest/GetStandardBaseOnList',
    method: 'get',
    params: params
  })
}

/**
 * 删除称量数据
 * @param {Object} data 
 */
export function DeleteTaskAttribute(data) {
  return request({
    url: 'API/QualityWeight/DeleteTaskAttribute',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
    // timeout: 120 * 1000
  })
}

/**
 *
 * @param {Object} params
 */
export function GetInstrumentManageActiveTreeTwo(params) {
  return request({
    url: 'API/InstrumentManage/GetRecordReportActiveTree',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  });
}

export function SelectTestProjectAttributes(params) {
  return request({
    url: 'API/ApparatusProject/SelectTestProjectAttribute',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  });
}

/**
 * 获取标准
 * @param {Object} params 
 */
export function PreviewElectronicRecordReport(params) {
  return request({
    url: 'API/RecordReport/PreviewElectronicRecordReport',
    method: 'get',
    params: params,
    successMsg: true,
    failMsg: true
  })
}
/**
 * 获取任务单
 * @param {Object} params 
 */
export function GetTaskItemsTwo(params) {
  return request({
    url: 'API/QualityWeight/GetTaskItemsTwo',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 获取批次
 * @param {Object} params 
 */
export function GetTaskBatchIDs(params) {
  return request({
    url: 'API/QualityWeight/GetTaskBatchIDs',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

export function GetTaskBatchIDss(params) {
  return request({
    url: 'api/ApparatusProject/SelectTestProjectBatchID',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  });
}

/**
 * 
 * @param {Object} params 
 */
export function GetRecordReportActiveTreeTwo(params) {
  return request({
    url: 'API/RecordReport/GetRecordReportActiveTree',
    method: 'get',
    params: params,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  });
}

export function SelectTestProjectAttribute(params) {
  return request({
    url: 'API/ApparatusProject/SelectTestProjectAttribute',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  });
}

export function GetTaskItemsTwos(params) {
  return request({
    url: 'API/ApparatusProject/SelectTestProjectData',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  });
}

/**
 * 加测反填
 * @param {Object} params 
 */
export function GetRecordReportDataTwo(params) {
  return request({
    url: 'API/RecordReport/GetRecordReportDataTwo',
    method: 'get',
    params: params,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 取样人
 * @param {Object} params 
 */
export function GetUserList(params) {
  return request({
    url: 'API/UserInfo/GetUserList',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 
 * @param {Object} params 
 */
export function GetTestShareTreeByCode(params) {
  return request({
    url: 'API/QualityTest/GetTestShareTreeByCode',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 
 * @param {Object} params 
 */
export function GetApkVersion(params) {
  return request({
    url: 'API/Systemsecurity/GetApkVersion',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: false
  })
}

// 文件上传

export function UploadRecordCorrelationFile(data) {
  return request({
    url: 'API/RecordFile/UploadRecordCorrelationFile',
    method: 'post',
    data: data,
    successMsg: false,
    failMsg: false
  })
}

// 获取文件列表
export function GetRecordCorrelationFiles(params) {
  return request({
    url: 'API/RecordFile/GetRecordCorrelationFiles',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: false
  })
}

// 获取文件预览地址
export function PreviewRecordCorrelationFile(params) {
  return request({
    url: 'API/RecordFile/PreviewRecordCorrelationFile',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: false
  })
}

// 删除附件
export function DeleteRecordCorrelationFile(params) {
  return request({
    url: 'API/RecordFile/DeleteRecordCorrelationFile',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: false
  })
}

// 获取服务器当前时间
export function GetServerDate(params) {
  return request({
    url: 'API/Authority/GetServerDate',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: false
  })
}

// 获取物料名称-不带规格
export function GetMaterialName(params) {
  return request({
    url: 'API/MaterialInfo/GetMaterialIDSelect',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: false
  })
}
// 获取称重批号
export function SelectWeightBatchId(params) {
  return request({
    url: 'API/ApparatusProject/SelectWeightBatchId',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: false
  })
}